/*
 * Example8Model.java  0.4.0 / 2010-10-22
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
package com.cute4j.examples;

import com.cute4j.swing.BoundedRangeModel;
import com.cute4j.swing.Container;
import com.cute4j.swing.DefaultBoundedRangeModel;
import com.cute4j.swing.ProgressBar;
import com.cute4j.swing.ScrollBar;
import com.cute4j.swing.Slider;
import com.cute4j.swing.Swing;

/**
 * Model Example.
 */
public class Example8Model extends Container {

  public Example8Model() {
    super(null);
    setName("Bounded Range Model");
    setFixedSize(296, 100);
    BoundedRangeModel model = new DefaultBoundedRangeModel(50, 0, 0, 100);
    Slider slider = new Slider(model);
    slider.setBounds(10, 10, 274, 20);
    add(slider);
    ProgressBar progressBar = new ProgressBar(model);
    progressBar.setBounds(10, 40, 274, 20);
    add(progressBar);
    ScrollBar scrollBar = new ScrollBar(model);
    scrollBar.setOrientation(ScrollBar.HORIZONTAL);
    scrollBar.setBounds(10, 71, 274, 18);
    add(scrollBar);
  }

  public static void main(String[] args) {
    Example8Model modelExample = new Example8Model();
    modelExample.setVisible(true);
    Swing.startEventLoop();
  }

}
